/*
 * Created on May 23, 2005
 *
 */
package littlecyberwar.tool;

import java.awt.Shape;
import java.awt.geom.AffineTransform;

import littlecyberwar.ui.Element;

/**
 * @author Milton  Soong
 *
 */
public class SelectedElementContainer {		
	public Element element;
	
	/**
	 * The current rectangular outline of a selected element 
	 * As it is being dragged around
	 */
	public Shape selectedRectangle;
	public AffineTransform currTrans;
	public double halfWidth, halfHeight;
	
	public SelectedElementContainer( Element elIn ) {
		element = elIn;
		resetElementContainer();
	}
	
	// the handler just changed, and all the elementContainer needs
	// to get jiggled again.
	public void resetElementContainer() {
		selectedRectangle = element.getFinalShape();
		// currTrans = element.getTransform();
		AffineTransform trans= element.getTransform();
		currTrans = (AffineTransform)trans.clone();
		halfWidth=0;
		halfHeight=0;
	}
}

